import React from 'react';
import { connect } from 'dva';
import App from '../components/App/App';

const IndexPage = ({ dispatch, app }) => {
  const handleClike = () => {
    dispatch({
      type: 'app/change',
    });
  };

  return (
    <App app={app} onClick={handleClike} />
  );
};

export default connect(({ app }) => ({
  app,
}))(IndexPage);
